﻿using iMES.Entity.SystemModels;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
using iMES.Entity.DomainModels;
using System.Linq.Expressions;

namespace iMES.Entity.DomainModels
{
    [Entity(TableCnName = "入库单",DetailTable = new Type[] {typeof(Invent_StoreDetails) },TableName = "Inventory_Store",  DetailTableCnName = "入库单明细", DBServer ="SysDbContext")]
    public partial class Inventory_Store: SysEntity
    {
        [Key]
        [Display(Name = "入库单主键ID")]
        [Column(TypeName = "int")]
        [Required(AllowEmptyStrings = false)]
        public int WareHouseBill_Id { get; set; }

        /// <summary>
        ///入库单号
        /// </summary>
        [Display(Name = "入库单号")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(200)")]
        [Editable(true)]
        public string WareHouseBillCode { get; set; }

        /// <summary>
        ///入库类型
        /// </summary>
        [Display(Name = "入库类型")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(200)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string WareHouseBillType { get; set; }

        /// <summary>
        ///入库时间
        /// </summary>
        [Display(Name = "入库时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public DateTime WareHouseDate { get; set; }

        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(1000)]
        [Column(TypeName = "nvarchar(1000)")]
        [Editable(true)]
        public string Remark { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        ///创建人编号
        /// </summary>
        [Display(Name = "创建人编号")]
        [Column(TypeName = "int")]
        public int? CreateID { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(200)")]
        public string Creator { get; set; }

        /// <summary>
        ///修改人
        /// </summary>
        [Display(Name = "修改人")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(200)")]
        public string Modifier { get; set; }

        /// <summary>
        ///修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        public DateTime? ModifyDate { get; set; }

        /// <summary>
        ///修改人编号
        /// </summary>
        [Display(Name = "修改人编号")]
        [Column(TypeName = "int")]
        public int? ModifyID { get; set; }

        [Display(Name = "入库明细")]
        [ForeignKey("WareHouseBill_Id")]
        public List<Invent_StoreDetails> Invent_StoreDetails { get; set; }
    }
}
